.class public Lcom/example/m6shop/BluetoothtextActivity;
.super Landroid/app/Activity;
.source "BluetoothtextActivity.java"

# interfaces
.implements Lorg/com/cctest/view/SlideSwitch$SlideListener;


# instance fields
.field private back:Landroid/widget/ImageView;

.field private bluename:Landroid/widget/TextView;

.field private blueprint:Landroid/widget/LinearLayout;

.field private connect:Landroid/widget/TextView;

.field m:Lmyapp/MyApp;

.field private mBluetoothSocket:Landroid/bluetooth/BluetoothSocket;

.field switch_btn:Lorg/com/cctest/view/SlideSwitch;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 24
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 25
    iput-object v0, p0, Lcom/example/m6shop/BluetoothtextActivity;->m:Lmyapp/MyApp;

    .line 30
    iput-object v0, p0, Lcom/example/m6shop/BluetoothtextActivity;->mBluetoothSocket:Landroid/bluetooth/BluetoothSocket;

    .line 24
    return-void
.end method


# virtual methods
.method public close()V
    .locals 4

    .prologue
    .line 77
    const-string v1, "blueInfo"

    const/4 v2, 0x0

    invoke-virtual {p0, v1, v2}, Lcom/example/m6shop/BluetoothtextActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 78
    .local v0, "userInfo":Landroid/content/SharedPreferences;
    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    const-string v2, "flag"

    const-string v3, "0"

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 79
    return-void
.end method

.method public init()V
    .locals 1

    .prologue
    .line 61
    const v0, 0x7f07006d

    invoke-virtual {p0, v0}, Lcom/example/m6shop/BluetoothtextActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/example/m6shop/BluetoothtextActivity;->bluename:Landroid/widget/TextView;

    .line 62
    const v0, 0x7f070109

    invoke-virtual {p0, v0}, Lcom/example/m6shop/BluetoothtextActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/example/m6shop/BluetoothtextActivity;->connect:Landroid/widget/TextView;

    .line 63
    const v0, 0x7f0700e6

    invoke-virtual {p0, v0}, Lcom/example/m6shop/BluetoothtextActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/example/m6shop/BluetoothtextActivity;->blueprint:Landroid/widget/LinearLayout;

    .line 64
    const v0, 0x7f0700cb

    invoke-virtual {p0, v0}, Lcom/example/m6shop/BluetoothtextActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/example/m6shop/BluetoothtextActivity;->back:Landroid/widget/ImageView;

    .line 65
    const v0, 0x7f07010a

    invoke-virtual {p0, v0}, Lcom/example/m6shop/BluetoothtextActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lorg/com/cctest/view/SlideSwitch;

    iput-object v0, p0, Lcom/example/m6shop/BluetoothtextActivity;->switch_btn:Lorg/com/cctest/view/SlideSwitch;

    .line 66
    iget-object v0, p0, Lcom/example/m6shop/BluetoothtextActivity;->switch_btn:Lorg/com/cctest/view/SlideSwitch;

    invoke-virtual {v0, p0}, Lorg/com/cctest/view/SlideSwitch;->setSlideListener(Lorg/com/cctest/view/SlideSwitch$SlideListener;)V

    .line 67
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 5
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 33
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 34
    const v3, 0x7f03002a

    invoke-virtual {p0, v3}, Lcom/example/m6shop/BluetoothtextActivity;->setContentView(I)V

    .line 35
    invoke-virtual {p0}, Lcom/example/m6shop/BluetoothtextActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v3

    check-cast v3, Lmyapp/MyApp;

    iput-object v3, p0, Lcom/example/m6shop/BluetoothtextActivity;->m:Lmyapp/MyApp;

    .line 36
    iget-object v3, p0, Lcom/example/m6shop/BluetoothtextActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v3}, Lmyapp/MyApp;->getActivity()Ljava/util/ArrayList;

    move-result-object v1

    .line 37
    .local v1, "activityList":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Landroid/app/Activity;>;"
    invoke-virtual {v1, p0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 39
    invoke-virtual {p0}, Lcom/example/m6shop/BluetoothtextActivity;->init()V

    .line 41
    const-string v3, "blueInfo"

    const/4 v4, 0x0

    invoke-virtual {p0, v3, v4}, Lcom/example/m6shop/BluetoothtextActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v2

    .line 42
    .local v2, "preferences":Landroid/content/SharedPreferences;
    const-string v3, "name"

    const-string v4, ""

    invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 43
    .local v0, "account":Ljava/lang/String;
    iget-object v3, p0, Lcom/example/m6shop/BluetoothtextActivity;->bluename:Landroid/widget/TextView;

    invoke-virtual {v3, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 45
    iget-object v3, p0, Lcom/example/m6shop/BluetoothtextActivity;->back:Landroid/widget/ImageView;

    new-instance v4, Lcom/example/m6shop/BluetoothtextActivity$1;

    invoke-direct {v4, p0}, Lcom/example/m6shop/BluetoothtextActivity$1;-><init>(Lcom/example/m6shop/BluetoothtextActivity;)V

    invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 51
    iget-object v3, p0, Lcom/example/m6shop/BluetoothtextActivity;->blueprint:Landroid/widget/LinearLayout;

    new-instance v4, Lcom/example/m6shop/BluetoothtextActivity$2;

    invoke-direct {v4, p0}, Lcom/example/m6shop/BluetoothtextActivity$2;-><init>(Lcom/example/m6shop/BluetoothtextActivity;)V

    invoke-virtual {v3, v4}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 58
    return-void
.end method

.method public open()V
    .locals 4

    .prologue
    .line 71
    const-string v1, "blueInfo"

    const/4 v2, 0x0

    invoke-virtual {p0, v1, v2}, Lcom/example/m6shop/BluetoothtextActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 72
    .local v0, "userInfo":Landroid/content/SharedPreferences;
    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    const-string v2, "flag"

    const-string v3, "1"

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 73
    return-void
.end method
